<template>
  <div>
    <input type="checkbox" :checked="checked" @change="updateValue($event.target.checked)" />
  </div>
</template>

<!-- <script>
export default {
  name: 'MyCheckbox',
  props: {
    checked: Boolean
  }
}
</script>
 -->
<script setup>
defineOptions({
  name: 'MyCheckbox'
})
defineProps({
  checked: {
    type: Boolean
  }
})
const emit = defineEmits(['update:checked'])
const updateValue = (value) => {
  emit('update:checked', value)
}
</script>
